#ifndef __QUEUE_H_
#define __QUEUE_H_

typedef struct msgbody
{
    char *data;
    int id;
    int length;
} Msgbody;

typedef struct node
{
    Msgbody *msg;
    struct node *next;
} Node;

typedef struct queue
{
    Node *head;
    Node *tail;
    int size;
} Queue;

void InitQueue(Queue *);
void EnQueue(Queue *, char *, int, int);
void EnQueue_msgBody(Queue *, Msgbody *);
Msgbody *DeQueue(Queue *queue);
void PrintQueue(Queue *queue);
int IsNull(Queue *queue);
void DelQueue(Queue *queue);

#endif